package com.project.bean;

public class EmployeeBean {
    private int id;
    private String name;
    private DeptBean dept;

    public EmployeeBean() {
    }

    public EmployeeBean(String name, int deptId) {
        this.name = name;
        this.dept = new DeptBean();
        this.dept.setId(deptId);
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public DeptBean getDept() {
        return dept;
    }

    public void setDept(DeptBean dept) {
        this.dept = dept;
    }

    @Override
    public String toString() {
        return "EmployeeBean{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", dept=" + dept +
                '}' + "\n";
    }
}
